COM AT+CMGC - Selection of message service
COM Version 1.0		03.01.05	T. Kleinmann
COM Version 1.1		24-05-06	C. Grzegorczyk

COM ToDo: Implement SMS-COMMAND PDU

Message PDU converter doesn't work properly, please execute this script using Hyper Terminal and command AT+CMGC

Message When it will be fixed, I will change the script

##from attglobals import *
##import SMS_PDU_processing

# Prepare PDU processing
##PduProcessor=SMS_PDU_processing.CPdu()

# This is the text for SMS
##TEXT1 = 'Test2'

# create corresponding PDUs for later use
##strPDU_TEXT1=PduProcessor.ConvertASCII2PDU(TEXT1)

# create PDU from TEXT1
##PduProcessor.m_strServiceCenterAddress=strSCA
##PduProcessor.m_strDestinationAddress=PrimaryMobilePhoneNumber
##PduProcessor.m_strUserData=TEXT1
##iPduLen=PduProcessor.CreateSubmitPDU()
##strSubmitPDU_TEXT1=PduProcessor.m_strCurrentPDU

##COM ('Message text in PDU format: ', PduProcessor.m_strCurrentPDU, ' length: ', iPduLen)

# Send SMS 
##AT+CMGC=iPduLen
##WAITFOR >
##ATCMD (1, PduProcessor.m_strCurrentPDU, chr(26))
##strCMGWResult=WAITFOR (1, 'OK')


AT
WAIT FOR OK
